package com.shangguigu.hadoopdashujv.pojo;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

import java.net.URI;

public class Hadoop3Demo {
    private FileSystem fs;
    //配置环境
    public Hadoop3Demo() throws Exception{
        Configuration conf = new Configuration();
        conf.set("fs.defaultFS", "hdfs://node1:8020");

        //设置客户端身份
        System.setProperty("HADOOP_USER_NAME", "hadoop");


        fs = FileSystem.get(URI.create("hdfs://node1:8020"),conf);
    }
    public static void main(String[] args) {
        //编写mapreduce程序统计word.txt中每个单词出现的次数

    }
}
